#ifndef SSY_MYSQL_DATABASE_H
#define SSY_MYSQL_DATABASE_H


#include "mysql.h"

typedef struct {
	char m_time[32];
	char m_location[128];
	char m_randValue[16];
	char m_license[32];
	char m_cartypeCode[8];
	char m_carCode[16];
	char m_vioCode[8];
	char m_picPath[256];
	int m_belt_driver_score;
	int m_belt_passenger_score;
	int m_phone_driver_score;
	int m_smoke_driver_score;
} t_MysqlResult;

#ifdef __cplusplus
extern "C" {
#endif

	void* Mysql_Connect(const char *host, const int port, const char *user, const char *passwd);
	void Mysql_Disconnect(const void *handle);
	bool Mysql_QueryViolation(const void *handle, t_MysqlResult *sqlResult);	
	bool Mysql_UpdateViolation(const void *handle, const t_MysqlResult *mysqlResult);

#ifdef __cplusplus
};
#endif


#endif // SSY_MYSQL_DATABASE_H

